<template>
	<view>
		<view class="uni-flex uni-column top">
			<view class="text">
				<view class="uni-center total">{{total}}</view>
				<view class="uni-center note">(总费用)</view>
				<!-- #ifdef MP-WEIXIN -->
				<view class="btn_yiju" @click="goyiju">计价依据</view>
				<!-- #endif -->
			</view>
		</view>
		<view class="my-list uni-padding-wrap">
			<view class="uni-flex my-list-cell">
				<view class="left">纸张费用</view>
				<view class="right">{{(list.zz*1).toFixed(4)}}</view>
			</view>
			<view class="uni-flex my-list-cell">
				<view class="left">印刷费用</view>
				<view class="right">{{(list.ys*1).toFixed(4)}}</view>
			</view>
			<view class="uni-flex my-list-cell">
				<view class="left">刀版费用</view>
				<view class="right">{{(list.db*1).toFixed(4)}}</view>
			</view>
			<view class="uni-flex my-list-cell">
				<view class="left">覆膜费用</view>
				<view class="right">{{(list.fm*1)}}</view>
			</view>
			<view class="uni-flex my-list-cell">
				<view class="left">粘盒费用</view>
				<view class="right">{{(list.zh*1).toFixed(4)}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:{}
			};
		},
		onLoad(e) {
			this.list =e;
		},
		computed:{
			total:function(){
				var t = (this.list.zz*1)+(this.list.ys*1)+(this.list.db*1)+(this.list.fm*1)+(this.list.zh*1);
				return t.toFixed(4);
			}
		},
		onNavigationBarButtonTap(e){
			if(e.index == 0){
				uni.navigateTo({
					url:"../yiju/yiju",
					animationType:"slide-in-bottom"
				})
			}
		},
		methods:{
			goyiju(){
				uni.navigateTo({
					url:"../yiju/yiju",
					animationType:"slide-in-bottom"
				})
			}
		}
	}
</script>

<style lang="scss">
	.top{
		width: 100%;
		height: 198upx;
		background-color: #CC33FF;
		justify-content: center;
		.text{
			color: #FFF;
			.total{
				font-size: 48upx;
			}
			.note{
				font-size: 20upx;
			}
		}
		position: relative;
		.btn_yiju{
			position: absolute;
			right:6upx;
			bottom:6upx;
		}
	}
	.my-list{
		.my-list-cell{
			justify-content: space-between;
			border-bottom:1px solid #F5F5F5;
			 padding:26upx 0;
		}
	}
</style>
